/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.qinyeit.serviceapp.entity.enums.DeliveryState;
import lombok.Builder;
import lombok.experimental.Tolerate;

import javax.persistence.*;

/**
 * ClassName: DeliveryDetail <br/>
 * Function: 配送明细 <br/>
 * date: 2018-12-04 11:15:17 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="delivery_details")
public class DeliveryDetail extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

//	// 配送id
//	@ManyToOne
//    @JoinColumn(name="delivery_id")
//	private DeliveryRecord delivery = null;
//
//	// 会员卡id
//	@ManyToOne(cascade =CascadeType.PERSIST)
//    @JoinColumn(name="card_id")
//	private MemberCard card = null;

//	 配送id
	@Column(name="delivery_id")
	private Long deliveryId = null;

	// 会员卡id
	@Column(name="card_id")
	private Long cardId = null;

	// 状态 
    @Column(name="state", length = 300)
	@Enumerated(EnumType.STRING)
	private DeliveryState state = DeliveryState.DELIVERY;


    @Tolerate
	public DeliveryDetail() {
		
	}
    @Tolerate
	public DeliveryDetail(Long id){
    	super.setId(id);
    }

	public Long getDeliveryId() {
		return deliveryId;
	}

	public void setDeliveryId(Long deliveryId) {
		this.deliveryId = deliveryId;
	}

	public Long getCardId() {
		return cardId;
	}

	public void setCardId(Long cardId) {
		this.cardId = cardId;
	}

	public DeliveryState getState() {
		return state;
	}

	public void setState(DeliveryState state) {
		this.state = state;
	}
}
